home *** CD-ROM | disk | FTP | other *** search
- on getLabel
- set lastMarker to marker(0)
- repeat with n = -1 down to -1000
- set nextMarker to marker(n)
- if lastMarker = nextMarker then
- exit repeat
- end if
- set lastMarker to nextMarker
- end repeat
- set lineNumber to n * -1
- return line lineNumber of the labelList
- end
-
- on SetScrollTopsToTop
- repeat with whichCastLib = 1 to the number of castLibs
- repeat with whichMember = 1 to the number of castMembers of castLib whichCastLib
- if (whichMember = 20) and (whichCastLib = 3) then
- nothing()
- end if
- if (the type of member whichMember of castLib whichCastLib = #field) or (the type of member whichMember of castLib whichCastLib = #richText) then
- set the scrollTop of member whichMember of castLib whichCastLib to 0
- end if
- end repeat
- end repeat
- end
-
- on GetTimerString ticksCount
- set sixtieths to ticksCount mod 60
- set seconds to ticksCount / 60
- set minutes to seconds / 60
- set seconds to seconds mod 60
- if sixtieths < 10 then
- set sixtieths to "0" & string(sixtieths)
- else
- set sixtieths to string(sixtieths)
- end if
- if seconds < 10 then
- set seconds to "0" & string(seconds)
- else
- set seconds to string(seconds)
- end if
- if minutes < 10 then
- set minutes to "0" & string(minutes)
- else
- set minutes to string(minutes)
- end if
- return minutes & ":" & seconds & ":" & sixtieths
- end
-
- on ScrollFieldToLine whichField, whichLine
- if whichLine = 0 then
- set whichLine to 1
- end if
- set memberNum to the number of member whichField
- set linesVisible to the pageHeight of member whichField / the textHeight of field whichField
- set totalLines to the number of lines in field whichField
- if linesVisible > totalLines then
- set topLine to 1
- else
- if totalLines > (whichLine + (linesVisible / 2)) then
- set topLine to whichLine - (linesVisible / 2)
- if topLine < 1 then
- set topLine to 1
- end if
- else
- set topLine to totalLines - linesVisible
- end if
- end if
- set topLine to topLine - 1
- set the scrollTop of member whichField to topLine * the textHeight of field whichField
- end
-